<!DOCTYPE html>
<!-- thymeleaf支持 -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>区块链学院学生竞赛管理系统</title>
  <link rel="stylesheet" href="/res/css/pintuer.css">
  <link rel="stylesheet" href="/res/css/admin.css">
  <script src="/res/js/jquery.js"></script>
  <script src="/res/js/pintuer.js"></script>
</head>
<body style="background-color:#f2f9fd;">
<div class="header bg-main">
  <div class="logo margin-big-left fadein-top">
    <h1><img src="/res/images/y.jpg" class="radius-circle rotate-hover" height="50" alt="" />区块链学院学生竞赛管理系统</h1>
  </div>
  <div class="head-l" style="float: right">

    <a href="##" class="button button-little bg-blue">
      <span class="icon-wrench"></span> 清除缓存</a> &nbsp;&nbsp;
    <a class="button button-little bg-red" href="#">
      <span class="icon-power-off"></span> 退出登录</a>&nbsp;&nbsp;
  </div>
</div>
<div class="leftnav">
  <div class="leftnav-title"><strong><span class="icon-list"></span>菜单列表</strong></div>
  <h2><span class="icon-user"></span>基本设置</h2>
  <ul style="display:block">
    <li><a href="/toTeaInfo" target="_self"><span class="icon-caret-right"></span>教师信息</a></li>
    <li><a href="#" target="_self"><span class="icon-caret-right"></span>系统消息</a></li>
    <li><a href="/teaGetAllCompetitionsByPages" target="_self">
      <span class="icon-caret-right"></span>竞赛信息</a>
    </li>
    <li><a th:href="@{/selectAllApplicationsByTeaName(teaName=${tea.teaName})}" target="_self"><span class="icon-caret-right"></span>报名审核</a></li>



  </ul>

</div>

<ul class="bread">
  <li><a href="/main.html" target="_self" class="icon-home"> 首页</a></li>
  <li><a href="##" id="a_leader_txt">竞赛信息</a></li>
  <li><b>当前语言：</b><span style="color:red;">中文</php></span>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;切换语言：<a href="##">中文</a> &nbsp;&nbsp;<a href="##">英文</a> </li>
</ul>

<div class="admin">
  <div class="panel admin-panel">
    <div class="panel-head"><strong><span class="icon-reorder"></span> 竞赛信息列表</strong></div>
    <div class="body-content">
      <form action="/teaGetCompetitionsByConditions">
        <!--                &nbsp;&nbsp;竞赛编号：<input type="text" name="comId" th:value="${comId}" class="input" style="width:150px; line-height:17px;display:inline-block"/>-->
        &nbsp;&nbsp;
        &nbsp;&nbsp;竞赛名称：<input type="text" name="comName" th:value="${comName}" class="input comname" style="width:150px; line-height:17px;display:inline-block"/>
        &nbsp;&nbsp;
        责任教师：<input type="text" name="dutyTeacher" th:value="${dutyTeacher}" class="input dutytea" style="width:150px; line-height:17px;display:inline-block"/>
        &nbsp;&nbsp;
        <input type="submit" value="查询竞赛" class="button border-main icon-search queryCompetitions"/>
        &nbsp;&nbsp;

      </form>
      <table class="table table-hover text-center">
        <thead>
        <tr>
          <th>竞赛编号</th>
          <th>竞赛名称</th>
          <th>竞赛类型</th>
          <!--                    <th>竞赛描述</th>-->
          <th>责任教师</th>
          <!--                    <th>创建时间</th>-->
          <th>联系电话</th>
          <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="competition:${pageInfo.list}">
          <td th:text="${competition['comId']}"></td>
          <td th:text="${competition['comName']}"></td>
          <td th:text="${competition['comType']}"></td>
          <!--                    <td th:text="${competition['describeInfo']}"></td>-->
          <td th:text="${competition['dutyTeacher']}"></td>
          <td th:text="${competition['teaPhone']}"></td>
          <td>
            <a th:href="@{/teaGetCompetitionBycomId(comId=${competition.comId})}" class="button border-main"><span class="icon-info"></span>  详情</a>
<!--            <a th:href="@{/studentApply(comId=${competition.comId},comName=${competition.comName},dutyTeacher=${competition.dutyTeacher},teaPhone=${competition.teaPhone})}"-->
<!--               class="button border-main baoming"><span class="icon-sign-in"></span>  报名</a>-->
<!--            <a th:href="@{/addFavorite(userNo=${stu.stuNo},comId=${competition.comId},comName=${competition.comName},dutyTeacher=${competition.dutyTeacher},teaPhone=${competition.teaPhone})}"-->
<!--               class="button border-main"><span class="icon-star-o"></span>  收藏</a>-->
          </td>
        </tr>

        <tr th:if="${pageInfo.total==0}">
          <td colspan="6" style="text-align: center">未查询到任何信息</td>
        </tr>
        </tbody>
      </table>
    </div>
  </div>
  <tr>
    <td colspan="6">
      <div th:if="${pageInfo.total>0}" class="pagelist">
        <!--                每页显示条数：-->
        <!--                <select id="select-rowNum">-->
        <!--                    <option value="2" th:selected="${2==pageInfo.pageSize}">2</option>-->
        <!--                    <option value="4" th:selected="${4==pageInfo.pageSize}">4</option>-->
        <!--                    <option value="8" th:selected="${8==pageInfo.pageSize}">8</option>-->
        <!--                </select>-->
        &nbsp;&nbsp;
        第<span th:text="${pageInfo.pageNum}"></span>页/共<span th:text="${pageInfo.pages}"></span>页
        &nbsp;&nbsp;
        第<span th:text="${pageInfo.startRow}"></span>行-第<span th:text="${pageInfo.endRow}"></span>行
        &nbsp;&nbsp;
        共<span th:text="${pageInfo.total}"></span>行
        &nbsp;&nbsp;
        <!--  /customer/selectCustomer 请求控制权的地址  -->
        <a th:href="@{/teaGetAllCompetitionsByPages(currentPageNum=1)}">首页</a>
        <!--  pageInfo.prePage 上一页   pageInfo.nextPage 下一页-->
        <span th:if="${pageInfo.hasPreviousPage}" style="border: none">
                    <a th:href="@{/teaGetAllCompetitionsByPages(currentPageNum=${pageInfo.prePage})}">上一页</a>
                </span>
        <span th:if="${pageInfo.hasNextPage}" style="border: none">
                    <a th:href="@{/teaGetAllCompetitionsByPages(currentPageNum=${pageInfo.nextPage})}">下一页</a>
                </span>
        <a th:href="@{/teaGetAllCompetitionsByPages(currentPageNum=${pageInfo.pages})}">末页</a>
        &nbsp;&nbsp;
        <!--                跳转到：第 <input type="text" id="txt-pageNum" style="width: 30px;"/> 页-->
        <!--                &nbsp;&nbsp;-->
        <!--                <input type="button" id="btn-pageNum" value=" GO " style="background-color: #0ae;border: 0px;-->
        <!--                color:white;border-radius: 3px;"/>-->
      </div>
    </td>
  </tr>
</div>

<!--<script>-->
<!--  $(".baoming").click(function(){-->
<!--    var comId = $(this).parent().siblings().eq(0).html();-->
<!--    var comName = $(this).parent().siblings().eq(1).html();-->
<!--    var dutyTeacher = $(this).parent().siblings().eq(3).html();-->
<!--    var teaPhone = $(this).parent().siblings().eq(4).html();-->
<!--    localStorage.setItem("comId",comId);-->
<!--    localStorage.setItem("comName",comName);-->
<!--    localStorage.setItem("dutyTeacher",dutyTeacher);-->
<!--    localStorage.setItem("teaPhone",teaPhone);-->
<!--  })-->
<!--</script>-->

</body>

</html>